import numpy as np

from base.activation import Tanh
from base.dense import DenseLayer
from base.loss import MSE
from base.network import train,predict
if __name__ == '__main__':
    X = np.reshape([[0, 0], [0, 1], [1, 0], [1, 1]], (4, 2, 1))
    Y = np.reshape([[0], [1], [1], [0]], (4, 1, 1))

    network = [
        DenseLayer(2, 3),
        Tanh(),
        DenseLayer(3, 1),
        Tanh()
    ]
    mse = MSE()
    epochs = 10000
    learning_rate = 0.1
    train(network, mse, epochs, learning_rate,X,Y)


    test = np.reshape([1,0],(2,1))
    predict(network, test)
